package com.ruoyi.mx.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 美秀商品对象 mx_goods_spu
 * 
 * @author ruoyi
 * @date 2021-10-28
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName("mx_goods_spu")
public class MxGoodsSpu implements Serializable {

private static final long serialVersionUID=1L;


    /** PK */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /** spu编码 */
    @Excel(name = "spu编码")
    private String spuCode;

    /** spu名字 */
    @Excel(name = "spu名字")
    private String name;

    /** 卖点 */
    @Excel(name = "卖点")
    private String sellPoint;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    /** 一级分类ID */
    @Excel(name = "一级分类ID")
    private String categoryFirst;

    /** 二级分类ID */
    @Excel(name = "二级分类ID")
    private String categorySecond;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String picUrls;

    /** 是否上架（1是 0否） */
    @Excel(name = "是否上架" , readConverterExp = "1=是,0=否")
    private String shelf;

    /** 排序字段 */
    @Excel(name = "排序字段")
    private Long sort;

    /** 销售价格 */
    @Excel(name = "销售价格")
    private BigDecimal salesPrice;

    /** 市场价 */
    @Excel(name = "市场价")
    private BigDecimal marketPrice;

    /** 成本价 */
    @Excel(name = "成本价")
    private BigDecimal costPrice;

    /** 库存 */
    @Excel(name = "库存")
    private Long stock;

    /** 销量 */
    @Excel(name = "销量")
    private Long saleNum;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 最后更新时间 */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 逻辑删除标记（0：显示；1：隐藏） */
    @TableLogic
    private String delFlag;
}
